Page({
  data: {
  calassList:[
      {name:"热销",
      term:[
          {
            "image": "../../images/01.JPG",
            "title": "摩天脆脆",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"1"
        },
        {
            "image": "../../images/06.jpg",
            "title": "蜜桃泡泡表白水",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"2"
        },
        {
            "image": "../../images/03.jpg",
            "title": "摇摇奶昔",
            "tippw":"￥8.00",
            "pickup": true,
            "id":"3"
        },
        {
            "image":"../../images/04.JPG",
            "title": "摩天脆脆",
            "tippw":"￥8.00",
            "pickup": true,
            "id":"4"
        },
        {
            "image": "../../images/025.jpg",
            "title": "外婆烧仙草",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"5"
        },
        {
            "image": "../../images/06.JPG",
            "title": "牛奶三拼",
            "tippw":"￥7.00",
            "pickup": false,
            "id":"6"
        },
        ]
      },
      {
        name:"新品推荐",
        term:[
            {
              "image":  "../../images/07.JPG",
              "title": "等一朵花开",
              "tippw":"￥8.00",
              "pickup": false,
              "id":"1"
          },
          {
              "image":  "../../images/010.JPG",
              "title": "且听风吟",
              "tippw":"￥8.00",
              "pickup": false,
              "id":"2"
          },
          {
              "image":  "../../images/011.JPG",
              "title": "你好，小可爱",
              "tippw":"￥8.00",
              "pickup": false,
              "id":"3"
          },
          {
            "image": "../../images/012.JPG",
            "title": "谋事先谋人",
            "tippw":"￥8.00",
              "pickup": true,
              "id":"4"
          },
          {
            "image": "../../images/013.JPG",
            "title": "生活明朗万物可爱",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"5"
        },
        {
            "image": "../../images/020.JPG",
            "title": "生活可抵漫长岁月",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"6"
        },
        ]
      },
      {
        name:'冰淇淋与茶',
        term:[
          {
            "image": "../../images/021.JPG",
            "title": "小蘑菇",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"1"
        },
        {
            "image": "../../images/022.jpg",
            "title": "某某",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"2"
        },
        {
            "image": "../../images/023.jpg",
            "title": "玫瑰的回忆",
            "tippw":"￥8.00",
            "pickup": true,
            "id":"3"
        },
        {
          "image": "../../images/024.jpg",
          "title": "谋事先谋人",
          "tippw":"￥8.00",
          "pickup": true,
          "id":"4"
      },
      {
        "image": "../../images/025.jpg",
        "title": "生活明朗万物可爱",
        "tippw":"￥8.00",
        "pickup": false,
        "id":"5"
    },
    {
        "image": "../../images/030.jpg",
        "title": "生活可抵漫长岁月",
        "tippw":"￥8.00",
        "pickup": false,
        "id":"6"
    },
        ]
      },
      {name:"真果茶",
      term:[
          {
            "image": "../../images/031.jpg",
            "title": "小蘑菇",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"1"
        },
        {
            "image": "../../images/032.jpg",
            "title": "某某",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"2"
        },
        {
            "image": "../../images/033.jpg",
            "title": "玫瑰的回忆",
            "tippw":"￥8.00",
            "pickup": true,
            "id":"3"
        },
        {
            "image":"../../images/034.jpg",
            "title": "凤楼",
            "tippw":"￥8.00",
            "pickup": true,
            "id":"4"
        },
        {
            "image": "../../images/035.jpg",
            "title": "茶道",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"5"
        },
        {
            "image": "../../images/036.jpg",
            "title": "坚守坐拥的书城",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"6"
        },
        ]
      },
      {
        name:"奶盖茶&原叶茶",
        term:[
            {
              "image":  "../../images/040.jpg",
              "title": "等一朵花开",
              "tippw":"￥8.00",
              "pickup": false,
              "id":"1"
          },
          {
              "image":  "../../images/031.jpg",
              "title": "且听风吟",
              "tippw":"￥8.00",
              "pickup": false,
              "id":"2"
          },
          {
              "image":  "../../images/042.jpg",
              "title": "你好，小可爱",
              "tippw":"￥8.00",
              "pickup": false,
              "id":"3"
          },
          {
            "image": "../../images/050.jpg",
            "title": "谋事先谋人",
            "tippw":"￥8.00",
              "pickup": true,
              "id":"4"
          },
          {
            "image": "../../images/051.jpg",
            "title": "生活明朗万物可爱",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"5"
        },
        {
            "image": "../../images/052.jpg",
            "title": "生活可抵漫长岁月",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"6"
        },
        ]
      },
      {
        name:'奶茶&特饮',
        term:[
          {
            "image": "../../images/040.jpg",
            "title": "小蘑菇",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"1"
        },
        {
            "image": "../../images/031.jpg",
            "title": "某某",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"2"
        },
        {
            "image": "../../images/032.jpg",
            "title": "玫瑰的回忆",
            "tippw":"￥8.00",
            "pickup": true,
            "id":"3"
        },
        {
          "image": "../../images/021.jpg",
          "title": "谋事先谋人",
          "tippw":"￥8.00",
          "pickup": true,
          "id":"4"
      },
      {
        "image": "../../images/033.jpg",
        "title": "生活明朗万物可爱",
        "tippw":"￥8.00",
        "pickup": false,
        "id":"5"
    },
    {
        "image": "../../images/050.jpg",
        "title": "生活可抵漫长岁月",
        "tippw":"￥8.00",
        "pickup": false,
        "id":"6"
    },
        ]
      },
      {name:"雪王提醒",
      term:[
          {
            "image": "../../images/03.jpg",
            "title": "小蘑菇",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"1"
        },
        {
            "image": "../../images/030.jpg",
            "title": "某某",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"2"
        },
        {
            "image": "../../images/010.jpg",
            "title": "玫瑰的回忆",
            "tippw":"￥8.00",
            "pickup": true,
            "id":"3"
        },
        {
            "image":"../../images/032.jpg",
            "title": "凤楼",
            "tippw":"￥8.00",
            "pickup": true,
            "id":"4"
        },
        {
            "image": "../../images/07.jpg",
            "title": "茶道",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"5"
        },
        {
            "image": "../../images/036.jpg",
            "title": "坚守坐拥的书城",
            "tippw":"￥8.00",
            "pickup": false,
            "id":"6"
        },
        ]
      },
    
       ],
    rightlist:[],
    activeindex:0
  },
  onLoad: function (options) {
    this.getrigtlist()
  },
  getrigtlist(){
    let rightlist = this.data.calassList[0].term
    this.setData({
      rightlist
    })
  },
handletap(e){
    let {index} = e.currentTarget.dataset
    let rightlist = this.data.calassList[index].term
    this.setData({
        activeindex:index,
        rightlist
    })
},
hanaletid(e){
    let {id} = e.currentTarget.dataset
    wx.navigateTo({
      url: '../../pages/logs/logs?id='+id+'&index='+this.data.activeindex,
    })
}
})
